package thread.invariantframework;

import java.util.Timer;
import java.util.TimerTask;

public class Timeout extends Timer {

	public Timeout(int delay, final String msg) {
		super(true); // Daemon thread
		schedule(new TimerTask() {
			public void run() {
				System.out.println(msg);
				System.exit(0);
			}
		}, delay);
	}
}
